package leetcode;


import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * create by duanx 2022/2/7
 *
 * @classname: Test3
 * @author: duanx
 * @date: 2022/2/7 9:22
 **/
public class Test12 {

    public static void main(String[] args) {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String str;
        try {
            while (!(str = reader.readLine()).isEmpty()) {
                StringBuilder builder = new StringBuilder();
                for (int i=0;i<str.length();i++){
                    char c = str.charAt(i);
                    if (c>='A'&&c<'Z'){
                        c = (char)(c + 33);

                    }else if (c=='Z'){
                        c = (char)(c + 7);
                    }else if (c>='a'&&c<='c'){
                        c = '2';
                    }else if (c>='d'&&c<='f'){
                        c = '3';
                    }else if (c>='g'&&c<='i'){
                        c = '4';
                    }else if (c>='j'&&c<='l'){
                        c = '5';
                    }else if (c>='m'&&c<='o'){
                        c = '6';
                    }else if (c>='p'&&c<='s'){
                        c = '7';
                    }else if (c>='t'&&c<='v'){
                        c = '8';
                    }else if (c>='w'&&c<='z'){
                        c = '9';
                    }
                    builder.append(c);
                }
                System.out.println(builder);
            }
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
